package com.bwie.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.bwie.common.domain.User;
import com.bwie.system.mapper.UserMapper;
import com.bwie.system.service.UserService;
import org.springframework.stereotype.Service;

import javax.naming.NamingEnumeration;

/**
 * @Author：ShenJiaFeng
 * @Package：com.bwie.service.impl
 * @Project：zg5_19
 * @name：UserviceImpl
 * @Date：2024/2/17 9:28
 */
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User>
implements UserService {

    @Override
    public User findByUserName(String userName) {
        LambdaQueryWrapper<User> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(User::getUserName,userName);
        return getOne(queryWrapper);
    }


    @Override
    public boolean save(User entity) {
        return super.save(entity);
    }
}
